﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using MiniIOC.IOCLIbs;

namespace MiniIOC.ServiceSample
{
    internal class GenericService<T> : IGenericService<T>
        where T : class
    {
        public IOCLIbs.IServiceProvider ServiceProvider { get; }
        public GenericService(IOCLIbs.IServiceProvider serviceProvider)
        {
            ServiceProvider = serviceProvider;
        }

        public T Service { get; set; } = null!;
        public IOCLIbs.IServiceProvider ServiceProviderForPropertyInject { get; set; } = null!;

        [NonInject]
        public T NoneInjectService { get; set; } = null!;
    }

    public interface IGenericService<T>
        where T : class
    {
        T Service { get; set; }
        IOCLIbs.IServiceProvider ServiceProvider { get; }
        IOCLIbs.IServiceProvider ServiceProviderForPropertyInject { get; set; }
        T NoneInjectService { get; set; }
    }
}
